import { createStore } from "vuex";
import reqUrl from "@/api/url";

const store = createStore({
    state() {
        return {
            user:{
                account: '',
                img: '',
                role: '',
                name: ''
            },
            url: reqUrl,
			cart:[],
			key:'',
            typeid:'',
			page:{
                orderPage:{lines:4,total:0},
                show:{curPage:0,lines:6,total:0},
                admBook:{curPage:0,lines: 6,total:0},
                admOrder:{curPage:0,lines: 6,total:0}
            },
            addOrUpdate:{
                hot:{id:''},
                type:{id:'',json:''},
                book:{id:''},
                admOrder:{}
            }
        };
    }
});

export default store;